\psset{unit=0.5,algebraic}
\begin{pspicture*}(-3,-3)(7,5)
\psaxes[labelFontSize=\scriptstyle,ticksize=-3pt 0,labelsep=2pt]{<->}(0,0)(-3,-3)(7,5)
\psplot[linecolor=blue]{-3}{1.9999}{(x+1)/(x-2)}
\psplot[linecolor=blue]{2.0001}{7}{(x+1)/(x-2)}
\psline[linecolor=red](-3,1)(7,1)
\footnotesize
\rput[l](3.5,4){$f(x)=\dfrac{x+1}{x-2}$}
\rput[b](-2,1.1){$y=1$}
\end{pspicture*}